<template>
  <div>
    <div class="title-component">
      <div class="normaltext title-text">{{title}}</div>
      <div class="home-icon" @click="gogogo">
        <image src="../../static/home.png" />
      </div>
    </div>
  </div>
</template>
<script>
  export default {
    props:['title'],
    methods: {
      gogogo() {console.log(1);
        wx.switchTab({
          url: '/pages/index/main'
        })
      }
    }
  }
</script>
<style scoped>
  .title-component{
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 95rpx;
    line-height: 95rpx;
    background: #2297D8;
    color: #fff;
  }
  .title-component .title-text{
    width: 100%;
    text-align: center;
  }
  .title-component image{
    width: 60rpx;
    height: 60rpx;
  }
  .title-component .home-icon{
    position: absolute;
    right: 10rpx;
    top: 17.5rpx;
  }
</style>
